package com.ccp.dev.demo.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.HashSet;

/**
 * 匿名访问配置类
 */
@Component
public class UrlConfig {

    @Autowired
    public void addAnonymousUrls(HashSet<String> anonymousUrls) {
        anonymousUrls.add("/demo/wDemozb/view/add");
        anonymousUrls.add("/demo/wDemozb/view/list");
        //增加具有匿名访问权限的url
    }


    @Autowired
    public void addRestUrls(HashSet<String> restUrls) {
        //增加具有rest风格的url
        restUrls.add("/demo/");
    }

    @Autowired
    public void addDoNotXssFilter(HashSet<String> doNotXssFilter) {
        //增加不需要xss过滤的url
        //doNotXssFilter.add("/**");
    }
}
